import http from "@/http/axios_config";

export async function fetchPostsList() {
  try {
    return await http.post('/api/posts/list', {});
  } catch (error: any) {
    return error;
  }
}

export async function fetchPostsDetail(id: string) {
  try {
    return await http.get(`/api/posts/detail/${id}`);
  } catch (error: any) {
    return error;
  }
}